<?php

/**
 * Cart form base class.
 *
 * @package    wifilez
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseCartForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'cart_id'         => new sfWidgetFormInputHidden(),
      'created'         => new sfWidgetFormDateTime(),
      'modified'        => new sfWidgetFormDateTime(),
      'account_id'      => new sfWidgetFormInput(),
      'invoice_id'      => new sfWidgetFormInput(),
      'shipping_method' => new sfWidgetFormInput(),
      'order_timeline'  => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'cart_id'         => new sfValidatorPropelChoice(array('model' => 'Cart', 'column' => 'cart_id', 'required' => false)),
      'created'         => new sfValidatorDateTime(array('required' => false)),
      'modified'        => new sfValidatorDateTime(array('required' => false)),
      'account_id'      => new sfValidatorInteger(),
      'invoice_id'      => new sfValidatorInteger(),
      'shipping_method' => new sfValidatorInteger(),
      'order_timeline'  => new sfValidatorInteger(),
    ));

    $this->widgetSchema->setNameFormat('cart[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Cart';
  }


}
